﻿<%@ Page Language="C#" MasterPageFile="~/BasicBase/BasicBase.master" AutoEventWireup="true"
    CodeFile="NewRoad.aspx.cs" Inherits="BasicBase_RoadSource_NewRoad" Title="无标题页"
    StylesheetTheme="Content" %>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <table width="100%" cellpadding="0" cellspacing="0" class="intable">
        <caption>
            <span>辖区道路</span>
        </caption>
        <tr>
            <td style="width: 10%">
                道路名称：
            </td>
            <td style="width: 40%">
                <asp:TextBox ID="txtRoad" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtRoad"
                    Display="Dynamic" ErrorMessage="*"></asp:RequiredFieldValidator>
            </td>
            <td style="width: 10%">
                道路走向：
            </td>
            <td style="width: 40%">
                <asp:TextBox ID="txTrend" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                道路起点：
            </td>
            <td>
                <asp:TextBox ID="txtStartPoint" runat="server"></asp:TextBox>
            </td>
            <td>
                道路终点：
            </td>
            <td>
                <asp:TextBox ID="txtEndPoint" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                道路长度：
            </td>
            <td>
                <asp:TextBox ID="txtLength" runat="server"></asp:TextBox>km<ajaxToolkit:FilteredTextBoxExtender
                    ID="FilteredTextBoxExtender3" runat="server" Enabled="True" FilterType="Custom, Numbers"
                    TargetControlID="txtLength" ValidChars=".">
                </ajaxToolkit:FilteredTextBoxExtender>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtLength"
                    Display="Dynamic" ErrorMessage="*"></asp:RequiredFieldValidator>
            </td>
            <td>
                道路宽度：
            </td>
            <td>
                <asp:TextBox ID="txtWidth" runat="server"></asp:TextBox>m<ajaxToolkit:FilteredTextBoxExtender
                    ID="FilteredTextBoxExtender1" runat="server" Enabled="True" FilterType="Custom, Numbers"
                    TargetControlID="txtWidth" ValidChars=".">
                </ajaxToolkit:FilteredTextBoxExtender>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtWidth"
                    Display="Dynamic" ErrorMessage="*"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td>
                道路等级：
            </td>
            <td>
                <asp:DropDownList ID="ddlRank" runat="server" Width="160px">
                    <asp:ListItem Value="4.0">快速路</asp:ListItem>
                    <asp:ListItem Value="3.0">主干路</asp:ListItem>
                    <asp:ListItem Value="2.0">次干路</asp:ListItem>
                    <asp:ListItem Value="1.0">支路</asp:ListItem>
                </asp:DropDownList>
            </td>
            <td>
                隶属辖区：
            </td>
            <td>
                <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="False">
                    <ContentTemplate>
                        <asp:DropDownList ID="ddlProvinces" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlProvinces_SelectedIndexChanged">
                        </asp:DropDownList>
                        <asp:DropDownList ID="ddlCities" runat="server">
                        </asp:DropDownList>
                    </ContentTemplate>
                    <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="ddlProvinces" EventName="SelectedIndexChanged" />
                    </Triggers>
                </asp:UpdatePanel>
            </td>
        </tr>
        <tr>
            <td align="center" colspan="4">
                <asp:Button ID="btnSave" runat="server" OnClick="btnSave_Click" Text="保存" />
            </td>
        </tr>
 <tr>
            <td align="center" colspan="4">
                <a target="_blank" href="../Instruction/道路信息填写说明.doc">查看填写说明</a>&nbsp; <span class="comment">咨询电话：（战训处）0311-89181132、（通讯处）0311-89181160</span>
            </td>
        </tr>
    </table>
    <div style="height: 400px">
        <asp:UpdatePanel ID="upBind" runat="server">
            <ContentTemplate>
                <asp:Label ID="lblInfo" runat="server" ForeColor="#FF8000"></asp:Label>
                <asp:GridView ID="gvRoads" runat="server" AutoGenerateColumns="False" OnRowDeleting="gvRoads_RowDeleting"
                    Caption="<span>道路列表</span>" DataKeyNames="RoadID" OnRowDataBound="gvRoads_RowDataBound"
                    PageSize="8">
                    <RowStyle HorizontalAlign="Center" />
                    <Columns>
                        <asp:TemplateField>
                            <ItemStyle HorizontalAlign="Center" />
                            <HeaderStyle Width="30px" />
                            <ItemTemplate>
                                <asp:Label ID="ID" runat="server" ForeColor="#666666"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="RoadName" HeaderText="道路名称" />
                        <asp:BoundField DataField="RegionName" HeaderText="辖区" />
                        <asp:BoundField DataField="Trend" HeaderText="走向" />
                        <asp:BoundField DataField="Length" HeaderText="长度(km)" />
                        <asp:BoundField DataField="Width" HeaderText="宽度(m)" />
                        <asp:BoundField DataField="StartPointName" HeaderText="道路起点" />
                        <asp:BoundField DataField="EndPointName" HeaderText="道路终点" />
                        <asp:TemplateField HeaderText="编辑">
                            <ItemTemplate>
                                <a href='<%# Eval("RoadID", "NewRoad.aspx?ID={0}") %>'>
                                    <img src="../../Images/Edit.gif" border="0" alt="编辑记录"></a>
                            </ItemTemplate>
                            <HeaderStyle Width="5%" HorizontalAlign="Center" />
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="删除">
                            <ItemTemplate>
                                <asp:ImageButton ID="ButtonDelete" runat="server" ImageUrl="~/Images/Delete.gif"
                                    ToolTip="删除记录" CommandName="Delete" OnClientClick="return confirm('你确定要删除此道路的数据吗?');" />
                            </ItemTemplate>
                            <HeaderStyle Width="5%" HorizontalAlign="Center" />
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                    </Columns>
                    <RowStyle HorizontalAlign="Left" />
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:GridView>
                <asp:Panel Width="100%" runat="server" ID="panPage" Visible="false">
                    <div style="padding: 4px;">
                        <div style="float: left">
                            <asp:Label ID="lbGridInfo" runat="server"></asp:Label>
                        </div>
                        <div style="float: right">
                            <asp:LinkButton ID="btnFirst" runat="server" CommandArgument="First" CommandName="Page"
                                OnClick="btnFirst_Click">首页</asp:LinkButton>
                            <asp:LinkButton ID="btnPrev" runat="server" CommandArgument="Prev" CommandName="Page"
                                OnClick="btnPrev_Click">上一页</asp:LinkButton>
                            <asp:LinkButton ID="btnNext" runat="server" CommandArgument="Next" CommandName="Page"
                                OnClick="btnNext_Click">下一页</asp:LinkButton>
                            <asp:LinkButton ID="btnLast" runat="server" CommandArgument="Last" CommandName="Page"
                                OnClick="btnLast_Click">末页</asp:LinkButton>
                            转到：第
                            <asp:DropDownList ID="JumpList" runat="server" AutoPostBack="True" OnSelectedIndexChanged="JumpList_SelectedIndexChanged">
                            </asp:DropDownList>
                            页
                        </div>
                    </div>
                </asp:Panel>
            </ContentTemplate>
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="ddlCities" EventName="SelectedIndexChanged" />
                <asp:AsyncPostBackTrigger ControlID="gvRoads" EventName="RowDeleting" />
                <asp:AsyncPostBackTrigger ControlID="btnSave" EventName="Click" />
            </Triggers>
        </asp:UpdatePanel>
    </div>
</asp:Content>
